<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/commons.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>现在加入微博，随时随地一起分享新鲜事！</title>
		<link rel="stylesheet" type="text/css" href="${ctx }/css/style_register.css" />
		<script type="text/javascript" src="${ctx }/js/jquery.js"></script>
    	<script type="text/javascript" src="${ctx }/js/city.js"></script>
   		<script language="javascript">
			$(function(){
			    initcity();
			});
		</script>
	</head>
	<body>
		<div id="wrapper">
			<div id="head"></div>
			<div id="">
				<em>${requestScope.message_error }</em>
				<form action="register" method="post">
					<fieldset>
						<legend>电子邮箱注册</legend>
						<label>我的邮箱</label>
						<input type="text" name="user.email" /><br />
						<label>创建密码</label>
						<input type="password" name="user.password" /><br />
						<label>昵称</label>
						<input type="text" name="user.nick" /><br />
						<label>性别</label>
						<input type="radio" name="user.sex" value="1" checked="checked" />男
						<input type="radio" name="user.sex" value="2" />女<br />
						<label>所在地</label>
						<div id="XMLCity">Loading....</div>
						<label>验证码</label><br />
						<input type="text" name="validcode" /><br />
						<img id="validcode" src="validcode.jpg" width="150" />
						<a id="refresh" href="#">换一换</a><br />
						<script type="text/javascript">
						    $(function(){
						        $('#refresh').click(function(){
						        	$("#validcode").hide().attr('src', 'validcode.jpg?' + Math.floor(Math.random()*100)).fadeIn(1000); 
						        });
						    });
						</script>
						<input type="submit" value="立即开通" /><%= session.getAttribute("KAPTCHA_SESSION_KEY") %>
					</fieldset>
				</form>
			</div>
		</div>
	</body>
</html>
